3.104 \(\int \frac {d+e x+f x^2}{\sqrt {a+c x^2}} \, dx\)

Optimal. Leaf size=74 \[ \frac {(2 c d-a f) \tanh ^{-1}\left (\frac {\sqrt {c} x}{\sqrt {a+c x^2}}\right )}{2 c^{3/2}}+\frac {e \sqrt {a+c x^2}}{c}+\frac {f x \sqrt {a+c x^2}}{2 c} \]

[Out]

1/2*(-a*f+2*c*d)*arctanh(x*c^(1/2)/(c*x^2+a)^(1/2))/c^(3/2)+e*(c*x^2+a)^(1/2)/c+1/2*f*x*(c*x^2+a)^(1/2)/c

________________________________________________________________________________________

Rubi [A]  time = 0.05, antiderivative size = 74, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 22, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.182, Rules used = {1815, 641, 217, 206} \[ \frac {(2 c d-a f) \tanh ^{-1}\left (\frac {\sqrt {c} x}{\sqrt {a+c x^2}}\right )}{2 c^{3/2}}+\frac {e \sqrt {a+c x^2}}{c}+\frac {f x \sqrt {a+c x^2}}{2 c} \]

Antiderivative was successfully verified.

[In]

Int[(d + e*x + f*x^2)/Sqrt[a + c*x^2],x]

[Out]

(e*Sqrt[a + c*x^2])/c + (f*x*Sqrt[a + c*x^2])/(2*c) + ((2*c*d - a*f)*ArcTanh[(Sqrt[c]*x)/Sqrt[a + c*x^2]])/(2*
c^(3/2))

Rule 206

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTanh[(Rt[-b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[-b, 2]), x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 217

Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Subst[Int[1/(1 - b*x^2), x], x, x/Sqrt[a + b*x^2]] /; FreeQ[{a,
b}, x] &&  !GtQ[a, 0]

Rule 641

Int[((d_) + (e_.)*(x_))*((a_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Simp[(e*(a + c*x^2)^(p + 1))/(2*c*(p + 1)),
x] + Dist[d, Int[(a + c*x^2)^p, x], x] /; FreeQ[{a, c, d, e, p}, x] && NeQ[p, -1]

Rule 1815

Int[(Pq_)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> With[{q = Expon[Pq, x], e = Coeff[Pq, x, Expon[Pq, x]]}, Si
mp[(e*x^(q - 1)*(a + b*x^2)^(p + 1))/(b*(q + 2*p + 1)), x] + Dist[1/(b*(q + 2*p + 1)), Int[(a + b*x^2)^p*Expan
dToSum[b*(q + 2*p + 1)*Pq - a*e*(q - 1)*x^(q - 2) - b*e*(q + 2*p + 1)*x^q, x], x], x]] /; FreeQ[{a, b, p}, x]
&& PolyQ[Pq, x] &&  !LeQ[p, -1]

Rubi steps

\begin {align*} \int \frac {d+e x+f x^2}{\sqrt {a+c x^2}} \, dx &=\frac {f x \sqrt {a+c x^2}}{2 c}+\frac {\int \frac {2 c d-a f+2 c e x}{\sqrt {a+c x^2}} \, dx}{2 c}\\ &=\frac {e \sqrt {a+c x^2}}{c}+\frac {f x \sqrt {a+c x^2}}{2 c}+\frac {(2 c d-a f) \int \frac {1}{\sqrt {a+c x^2}} \, dx}{2 c}\\ &=\frac {e \sqrt {a+c x^2}}{c}+\frac {f x \sqrt {a+c x^2}}{2 c}+\frac {(2 c d-a f) \operatorname {Subst}\left (\int \frac {1}{1-c x^2} \, dx,x,\frac {x}{\sqrt {a+c x^2}}\right )}{2 c}\\ &=\frac {e \sqrt {a+c x^2}}{c}+\frac {f x \sqrt {a+c x^2}}{2 c}+\frac {(2 c d-a f) \tanh ^{-1}\left (\frac {\sqrt {c} x}{\sqrt {a+c x^2}}\right )}{2 c^{3/2}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.04, size = 63, normalized size = 0.85 \[ \frac {(2 c d-a f) \tanh ^{-1}\left (\frac {\sqrt {c} x}{\sqrt {a+c x^2}}\right )+\sqrt {c} \sqrt {a+c x^2} (2 e+f x)}{2 c^{3/2}} \]

Antiderivative was successfully verified.

[In]

Integrate[(d + e*x + f*x^2)/Sqrt[a + c*x^2],x]

[Out]

(Sqrt[c]*(2*e + f*x)*Sqrt[a + c*x^2] + (2*c*d - a*f)*ArcTanh[(Sqrt[c]*x)/Sqrt[a + c*x^2]])/(2*c^(3/2))

________________________________________________________________________________________

fricas [A]  time = 0.60, size = 124, normalized size = 1.68 \[ \left [-\frac {{\left (2 \, c d - a f\right )} \sqrt {c} \log \left (-2 \, c x^{2} + 2 \, \sqrt {c x^{2} + a} \sqrt {c} x - a\right ) - 2 \, {\left (c f x + 2 \, c e\right )} \sqrt {c x^{2} + a}}{4 \, c^{2}}, -\frac {{\left (2 \, c d - a f\right )} \sqrt {-c} \arctan \left (\frac {\sqrt {-c} x}{\sqrt {c x^{2} + a}}\right ) - {\left (c f x + 2 \, c e\right )} \sqrt {c x^{2} + a}}{2 \, c^{2}}\right ] \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x^2+e*x+d)/(c*x^2+a)^(1/2),x, algorithm="fricas")

[Out]

[-1/4*((2*c*d - a*f)*sqrt(c)*log(-2*c*x^2 + 2*sqrt(c*x^2 + a)*sqrt(c)*x - a) - 2*(c*f*x + 2*c*e)*sqrt(c*x^2 +
a))/c^2, -1/2*((2*c*d - a*f)*sqrt(-c)*arctan(sqrt(-c)*x/sqrt(c*x^2 + a)) - (c*f*x + 2*c*e)*sqrt(c*x^2 + a))/c^
2]

________________________________________________________________________________________

giac [A]  time = 0.20, size = 58, normalized size = 0.78 \[ \frac {1}{2} \, \sqrt {c x^{2} + a} {\left (\frac {f x}{c} + \frac {2 \, e}{c}\right )} - \frac {{\left (2 \, c d - a f\right )} \log \left ({\left | -\sqrt {c} x + \sqrt {c x^{2} + a} \right |}\right )}{2 \, c^{\frac {3}{2}}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x^2+e*x+d)/(c*x^2+a)^(1/2),x, algorithm="giac")

[Out]

1/2*sqrt(c*x^2 + a)*(f*x/c + 2*e/c) - 1/2*(2*c*d - a*f)*log(abs(-sqrt(c)*x + sqrt(c*x^2 + a)))/c^(3/2)

________________________________________________________________________________________

maple [A]  time = 0.01, size = 76, normalized size = 1.03 \[ -\frac {a f \ln \left (\sqrt {c}\, x +\sqrt {c \,x^{2}+a}\right )}{2 c^{\frac {3}{2}}}+\frac {d \ln \left (\sqrt {c}\, x +\sqrt {c \,x^{2}+a}\right )}{\sqrt {c}}+\frac {\sqrt {c \,x^{2}+a}\, f x}{2 c}+\frac {\sqrt {c \,x^{2}+a}\, e}{c} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((f*x^2+e*x+d)/(c*x^2+a)^(1/2),x)

[Out]

1/2*f*x*(c*x^2+a)^(1/2)/c-1/2*f*a/c^(3/2)*ln(c^(1/2)*x+(c*x^2+a)^(1/2))+e*(c*x^2+a)^(1/2)/c+d*ln(c^(1/2)*x+(c*
x^2+a)^(1/2))/c^(1/2)

________________________________________________________________________________________

maxima [A]  time = 0.43, size = 61, normalized size = 0.82 \[ \frac {\sqrt {c x^{2} + a} f x}{2 \, c} + \frac {d \operatorname {arsinh}\left (\frac {c x}{\sqrt {a c}}\right )}{\sqrt {c}} - \frac {a f \operatorname {arsinh}\left (\frac {c x}{\sqrt {a c}}\right )}{2 \, c^{\frac {3}{2}}} + \frac {\sqrt {c x^{2} + a} e}{c} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x^2+e*x+d)/(c*x^2+a)^(1/2),x, algorithm="maxima")

[Out]

1/2*sqrt(c*x^2 + a)*f*x/c + d*arcsinh(c*x/sqrt(a*c))/sqrt(c) - 1/2*a*f*arcsinh(c*x/sqrt(a*c))/c^(3/2) + sqrt(c
*x^2 + a)*e/c

________________________________________________________________________________________

mupad [B]  time = 4.56, size = 107, normalized size = 1.45 \[ \left \{\begin {array}{cl} \frac {2\,f\,x^3+3\,e\,x^2+6\,d\,x}{6\,\sqrt {a}} & \text {\ if\ \ }c=0\\ \frac {e\,\sqrt {c\,x^2+a}}{c}+\frac {d\,\ln \left (\sqrt {c}\,x+\sqrt {c\,x^2+a}\right )}{\sqrt {c}}-\frac {a\,f\,\ln \left (2\,\sqrt {c}\,x+2\,\sqrt {c\,x^2+a}\right )}{2\,c^{3/2}}+\frac {f\,x\,\sqrt {c\,x^2+a}}{2\,c} & \text {\ if\ \ }c\neq 0 \end {array}\right . \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((d + e*x + f*x^2)/(a + c*x^2)^(1/2),x)

[Out]

piecewise(c == 0, (6*d*x + 3*e*x^2 + 2*f*x^3)/(6*a^(1/2)), c ~= 0, (e*(a + c*x^2)^(1/2))/c + (d*log(c^(1/2)*x
+ (a + c*x^2)^(1/2)))/c^(1/2) - (a*f*log(2*c^(1/2)*x + 2*(a + c*x^2)^(1/2)))/(2*c^(3/2)) + (f*x*(a + c*x^2)^(1
/2))/(2*c))

________________________________________________________________________________________

sympy [A]  time = 3.50, size = 150, normalized size = 2.03 \[ \frac {\sqrt {a} f x \sqrt {1 + \frac {c x^{2}}{a}}}{2 c} - \frac {a f \operatorname {asinh}{\left (\frac {\sqrt {c} x}{\sqrt {a}} \right )}}{2 c^{\frac {3}{2}}} + d \left (\begin {cases} \frac {\sqrt {- \frac {a}{c}} \operatorname {asin}{\left (x \sqrt {- \frac {c}{a}} \right )}}{\sqrt {a}} & \text {for}\: a > 0 \wedge c < 0 \\\frac {\sqrt {\frac {a}{c}} \operatorname {asinh}{\left (x \sqrt {\frac {c}{a}} \right )}}{\sqrt {a}} & \text {for}\: a > 0 \wedge c > 0 \\\frac {\sqrt {- \frac {a}{c}} \operatorname {acosh}{\left (x \sqrt {- \frac {c}{a}} \right )}}{\sqrt {- a}} & \text {for}\: c > 0 \wedge a < 0 \end {cases}\right ) + e \left (\begin {cases} \frac {x^{2}}{2 \sqrt {a}} & \text {for}\: c = 0 \\\frac {\sqrt {a + c x^{2}}}{c} & \text {otherwise} \end {cases}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x**2+e*x+d)/(c*x**2+a)**(1/2),x)

[Out]

sqrt(a)*f*x*sqrt(1 + c*x**2/a)/(2*c) - a*f*asinh(sqrt(c)*x/sqrt(a))/(2*c**(3/2)) + d*Piecewise((sqrt(-a/c)*asi
n(x*sqrt(-c/a))/sqrt(a), (a > 0) & (c < 0)), (sqrt(a/c)*asinh(x*sqrt(c/a))/sqrt(a), (a > 0) & (c > 0)), (sqrt(
-a/c)*acosh(x*sqrt(-c/a))/sqrt(-a), (c > 0) & (a < 0))) + e*Piecewise((x**2/(2*sqrt(a)), Eq(c, 0)), (sqrt(a +
c*x**2)/c, True))

________________________________________________________________________________________